var oldItem = 1;	// previous row
var oldcolor;		// color of previous row			
var ObjectID = "";	// store Object ID of row chooses
var RowColor;		// store color default of row			
var oldClassColor;	// store background color of previous row
var RowID = "";
			
function setColorStyle(item,str) {
	// check if not click on current row
	if (item != oldItem) {
		// reset color of previous row when click on other row 
		if(oldItem != 1)	
			oldItem.style.backgroundColor = oldcolor;
				
		oldItem = item;			// update old row
		oldcolor = RowColor;	// update old color
		
		// set color on row selected
		item.style.backgroundColor = "#eee8aa";
		oldClassColor = item.style.backgroundColor;
		// store user ID had been selected	
		ObjectID = str;
	}
}
			
function setHref(item,str) {
	item.location.href = str + "&row=" + ObjectID;
}	
					
function changeColorStyle(item) {
	// get color default of row
	RowColor = item.style.backgroundColor;
	oldClassColor = item.style.backgroundColor;
	// set color on row when mouse over			
	item.style.backgroundColor = "#EDFEFC";
}
			
function resetColorStyle(item) {
	// reset old background color of current row
	item.style.backgroundColor = oldClassColor;
}